<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('edit customer')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-customer-edit" th:object="${customer}">
            <input id="customerId" name="customerId" th:field="*{customerId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">email address：</label>
				<div class="col-sm-8">
					<input id="emailAddress" name="emailAddress" th:field="*{emailAddress}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">first name：</label>
				<div class="col-sm-8">
					<input id="firstName" name="firstName" th:field="*{firstName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">last name：</label>
				<div class="col-sm-8">
					<input id="lastName" name="lastName" th:field="*{lastName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">gender：</label>
				<div class="col-sm-8">
					<input id="gender" name="gender" th:field="*{gender}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">phone：</label>
				<div class="col-sm-8">
					<input id="phone" name="phone" th:field="*{phone}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">country：</label>
				<div class="col-sm-8">
					<input id="country" name="country" th:field="*{country}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">address：</label>
				<div class="col-sm-8">
					<input id="address" name="address" th:field="*{address}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">state：</label>
				<div class="col-sm-8">
					<input id="state" name="state" th:field="*{state}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/customer";
		$("#form-customer-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-customer-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
